package com.caosy.grassthinkremote.entity.vo;

import com.caosy.grassthinkremote.entity.Commodity;
import lombok.Data;
import org.springframework.beans.BeanUtils;

@Data
public class CommodityReq {
    /**
     * 商品id
     */
    private Long id;

    /**
     * 商品名称
     */
    private String name;

    /**
     * 商品描述
     */
    private String desc;

    public Commodity toCommodity() {
        Commodity commodity = new Commodity();
        BeanUtils.copyProperties(this,commodity);
        return commodity;
    }
}
